<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="style/default.css">

<title>${title}</title>
</head>
<body>
	<div id="main-wrapper">
		<div id="wrapper">
			<jsp:include page="menu.jsp"></jsp:include>
			<div id="content-block">
				<div id="content-wrapper">
					<h1>${title}</h1>
					<div class="horizontal-line"></div>
					<c:choose>
						<c:when test="${empty bo.error}">
							<div id="table-block">
								<div class="table-wrapper">
									<form action="patient" method="get">
										<table class="list-table">
											<tr>
												<c:forEach items="${titles}" var="column">
													<th class="${listType}">${column}</th>
												</c:forEach>
											</tr>
											<c:forEach items="${list}" var="patient">
												<tr class="${listType}">
													<td>
														<button name="id" value="${patient.id}" type="submit">
															<c:out value="${patient.firstName}" />
														</button>
													</td>
													<td>
														<button name="id" value="${patient.id}" type="submit">
															<c:out value="${patient.lastName}" />
														</button>
													</td>
													<td>
														<button name="id" value="${patient.id}" type="submit">
															<c:out value="${patient.mail}" />
														</button>
													</td>
													<td>
														<button name="id" value="${patient.id}" type="submit">
															<c:out value="${patient.phoneNumber}" />
														</button>
													</td>
												</tr>
											</c:forEach>
										</table>
									</form>
								</div>
								<c:if test="${pageCount>1}">
									<jsp:include page="page_index_block.jsp"></jsp:include>
								</c:if>
							</div>
						</c:when>
						<c:otherwise>
							<p class="error">${bo.error}</p>
						</c:otherwise>
					</c:choose>
				</div>
			</div>
		</div>
		<jsp:include page="footer.jsp"></jsp:include>
	</div>
</body>
</html>